Current shaping for dimmable LED

ABSTRACT

Aspects of the disclosure provide a circuit that includes a detector and a controller. The detector is configured to detect a firing start by a triode for alternating current (TRIAC) in a power supply. The controller is configured to control a switch in connection with a magnetic component in response to the firing start to shape a profile of a current pulled from the power supply to satisfy a latch current requirement and a hold current requirement of the TRIAC.

INCORPORATION BY REFERENCE

This present disclosure claims the benefit of U.S. ProvisionalApplication No. 61/827,159, “New Latch Current Shaping Method to ImprovePhase Cut Dimmer Compatibility” filed on May 24, 2013, and U.S.Provisional Application No. 61/830,791, “New Latch Current ShapingMethod to Improve Phase Cut Dimmer Compatibility” filed on Jun. 4, 2013,which are incorporated herein by reference in their entirety.

BACKGROUND

The background description provided herein is for the purpose ofgenerally presenting the context of the disclosure. Work of thepresently named inventors, to the extent the work is described in thisbackground section, as well as aspects of the description that may nototherwise qualify as prior art at the time of filing, are neitherexpressly nor impliedly admitted as prior art against the presentdisclosure.

Light emitting diode (LED) lighting devices provide the advantages oflow power consumption and long service life. Thus, LED lighting devicesmay be used as general lighting equipment to replace, for example,fluorescent lamps, bulbs, halogen lamps, and the like.

SUMMARY

Aspects of the disclosure provide a circuit that includes a detector anda controller. The detector is configured to detect a firing start by atriode for alternating current (TRIAC) in a power supply. The controlleris configured to control a switch in connection with a magneticcomponent in response to the firing start to shape a profile of acurrent pulled from the power supply to satisfy a latch currentrequirement and a hold current requirement of the TRIAC.

According to an aspect of the disclosure, the controller is configuredto pull the current at a first level to enable enough latch current forthe TRIAC at the firing start, and is configured to pull the current ata second level that is lower than the first level to enable enough holdcurrent for the TRIAC after the firing start. In an example, thecontroller is configured to control at least one of a rising edge delayfor the current to rise to the first level, a rising edge slope for thecurrent to rise to the first level, a duration for the current to abovea threshold, and a falling edge slope for the current to fall from thefirst level to the second level.

In an embodiment, the detector is configured to detect a switchingcurrent passing through the switch, and the controller is configured tocontrol the switch according to the detected switching current to shapethe current pulled from the power supply. In an example, the currentpulled from the power supply includes the switching current, and adamping current by a damping circuit.

Aspects of the disclosure provide an apparatus that includes a switch inconnection with a magnetic component for transferring energy from anenergy source to a load. Further, the apparatus includes an integratedcircuit (IC) chip having a detector and a controller. The detector isconfigured to detect a firing start by a triode for alternating current(TRIAC) in the energy source. The controller is configured to controlthe switch in response to the firing start to shape a profile of acurrent pulled from the energy source to satisfy a latch currentrequirement and a hold current requirement of the TRIAC.

Aspects of the disclosure provide a method. The method includesdetecting a firing start by a triode for alternating current (TRIAC) ina power supply, and switching on/off a switch in connection with amagnetic component in response to the firing start to shape a profile ofa current pulled from the power supply to satisfy a latch currentrequirement and a hold current requirement of the TRIAC.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of this disclosure that are proposed as exampleswill be described in detail with reference to the following figures,wherein like numerals reference like elements, and wherein:

FIG. 1 shows a block diagram of an electronic system 100 according to anembodiment of the disclosure;

FIG. 2 shows a block diagram of another electronic system 200 accordingto an embodiment of the disclosure;

FIG. 3 shows a plot of waveforms according to an embodiment of thedisclosure; and

FIG. 4 shows a flow chart outlining a process example 400 according toan embodiment of the disclosure.

DETAILED DESCRIPTION OF EMBODIMENTS

FIG. 1 shows a block diagram of an electronic system 100 according to anembodiment of the disclosure. The electronic system 100 receiveselectric energy from an energy source, such as an AC power supply 101with or without a dimmer 102. The AC power supply 101 can be anysuitable AC power supply, such as 60 Hz 110V AC power supply, 50 Hz 220VAC power supply, and the like. In an embodiment, an existing powersupply, for example in the form of a power socket built in a wallincludes the AC power supply 101 with or without the dimmer 102. Theelectronic system 100 is plugged into the power socket to receive powerfrom the existing power supply. The electronic system 100 is configuredto be compatible with various possible existing power supply. Forexample, the electronic system 100 is configured to be compatible withan existing power supply with the dimmer 102. Specifically, according toan aspect of the disclosure, the electronic system 100 is configured toshape a profile of a current drawn from an existing power supply whenthe dimmer 102 exists to be compatible with the existing power supply.

In an embodiment, the dimmer 102 is a phase-cut type dimmer, such as atriode for alternating current (TRIAC), having an adjustable dimmingangle α. The dimming angle α defines a size of a phase-cut range duringwhich the TRIAC is turned off. Further, a phase range that is out of thephase-cut range can be referred to as a conduction angle during whichthe TRIAC is turned on. During an AC cycle, when the phase of the ACvoltage V_(AC) is in the phase-cut range, the TRIAC is turned off. Thus,an output voltage of the dimmer 102 is about zero. When the phase of theAC voltage V_(AC) is out of the phase-cut range (e.g., in the conductionangle), the TRIAC is turned on. Thus, the output voltage of the dimmer102 is about the same as the AC voltage V_(AC). The phase-cut dimmer 102can be a leading edge TRIAC, a trailing edge dimmer, or other type ofdimmer.

Generally, the TRIAC type dimmer 102 requires a latch current at afiring start to turn on the TRIAC type dimmer 102, and a hold currentduring the turn-on time after the firing start. The latch current is aminimum current required at the firing start to turn on the TRIAC typedimmer 102, and the hold current is the minimum current required tomaintain the turn-on status for the TRIAC type dimmer 102. Typically,the latch current and the hold current are about 5 to 50 mA, and thelatch current is larger than the hold current. When one or both of thelatch current requirement and the hold current requirement are notsatisfied, the TRIAC type dimmer 102 misfires and may cause unpleasantuser experience, such as light flickering when the electronic system 100is a lighting system.

According to an aspect of the disclosure, the electronic system 100drives a load 109 that is a power efficient device. In an example, theload 109 is a light emitting diode (LED) lighting device that generallydraws a relatively small current from the power supply. According to theaspect of the disclosure, the electronic system 100 is configured toshape a profile of a current drawn from the power supply to becompatible with, for example the TRIAC type the dimmer 102. In anexample, the electronic system 100 is configured to pull the current ata first level that is large enough to satisfy the latch currentrequirement of the TRIAC type dimmer 102 at the firing start, and pullthe current at a second level that is large enough to satisfy the holdcurrent requirement of the TRIAC type dimmer 102 after the firing start.

In the FIG. 1 example, the electronic system 100 includes a rectifier103, a damping circuit 104, a control circuit 110, an energy transfermodule 120, and a load 109. These elements are coupled together as shownin FIG. 1. Generally, the energy transfer module 120 includes one ormore switches, and the control circuit 110 controls the switches totransfer energy from the energy source to the load 109. The load 109 canbe any suitable device, such as a lighting device, a fan, and the like.In an embodiment, the load 109 includes a plurality of light emittingdiodes (LEDs). The load 109 and the other components of the electronicsystem 100 are assembled into a package to form an LED lighting deviceto replace, for example, a fluorescent lamp, a halogen lamp, and thelike.

Specifically, in the FIG. 1 example, the rectifier 103 rectifies an ACvoltage to a fixed polarity, such as to be positive. In an example, therectifier 103 is a bridge rectifier. The bridge rectifier 103 receivesthe output voltage of the dimmer 102, and rectifies the received voltageto a fixed polarity, such as to be positive, and provides a rectifiedvoltage V_(RECT) to following circuits, such as the energy transfermodule 120.

According to an aspect of the disclosure, the damping circuit 104 isconfigured to draw additional current from the power supply in order tosupport the operation of the dimmer 102. In an example, the totalcurrent drawn from the power supply is refereed to as line current, thecurrent drawn by the damping circuit 105 is referred to as dampingcurrent I_(DAMPING), and the current drawn by the energy transfer module120 is referred to as an input current I_(IN). The line current is thesum of the damping current and the input current.

In the FIG. 1 example, the damping circuit 104 includes a resistorR_(DAMPING) and a capacitor C_(DAMPING) coupled together. At the time ofthe firing start in the dimmer 102, the damping circuit 105 provides acurrent path for high frequency components to reduce voltage and currentspikes in the rectified voltage V_(RECT) due to the firing. In anexample, when the capacitor C_(DAMPING) has a relatively largecapacitance, such as in the order of μF, the damping circuit 105 candraw a relatively large damping current at the time of the firing start,and thus the electronic system 100 is relatively stable. However, thelarge capacitance makes it difficult to reduce the size of theelectronic system 100.

In an embodiment, the electronic system 100 is implemented to use arelatively small capacitor C_(DAMPING), such as in the order of nF orless, to reduce the size of the electronic system 100. Further, theelectronic system 100 is configured to shape the input current I_(IN) inorder to cause the line current drawn from the power supply to satisfythe latch current requirement and the hold current requirement. Inanother embodiment, the electronic system 100 does not have the dampingcircuit 104, the input current I_(IN) is shaped to cause the linecurrent drawn from the power supply to satisfy the latch currentrequirement and the hold current requirement.

The energy transfer module 120 transfers electric energy provided by therectified voltage V_(RECT) to one or more load devices, such as the load109 and the like. In an embodiment, the energy transfer module 120 isconfigured to use a magnetic component, such as a transformer, aninductor, and the like to transfer the electric energy. The energytransfer module 120 can have any suitable topology, such as a fly-backtopology, a buck-boost topology, and the like. In the FIG. 1 example,the energy transfer module 120 includes an inductor L, a switch Q, adiode D, a capacitor C, and a current sensing resistor R_(SNS). Thesecomponents are coupled to the energy source (e.g., the rectified voltageV_(RECT)) and the load 109 in a buck-boost topology as shown in FIG. 1to drive the load 109. It is noted that the energy transfer module 120can be modified to use other suitable topology to transfer the electricenergy.

Generally, in the FIG. 1 example, when the switch Q is switched on(e.g., conductive), the inductor L, the switch Q, and the currentsensing resistor R_(SNS) form a current path from the power supply tothe ground, the power supply charges the inductor L, and the inductor Lstores electric energy. When the switch Q is switched off (e.g.,non-conductive), the electric energy stored in the inductor L isdischarged to the load 109 and the capacitor C. The capacitor C storesthe electric energy. The electric energy stored in the capacitor C canbe provided to the load 109 during the time duration when the switch Qis switched on. When the switch Q is switched on/off fast, the inductorL is charged and discharged slightly in each cycle, and a relativelysteady voltage to the load 109 can be maintained.

The current sensing resistor R_(SNS) is configured to sense the currentI_(Q) flowing through the switch Q, and provide the sensed current tothe control circuit 110. In an example, the current sensing resistorR_(SNS) has a relatively small resistance such that a voltage drop onthe resistor is small compared to the rectified voltage V_(RECT). Thevoltage drop is indicative of the current I_(Q). In an example, thevoltage drop is provided to the control circuit 110 as the sensedcurrent. It is noted that, in another embodiment, a different currentsensing technique, such as a current mirror based current sensingtechnique is used to replace the current sensing resistor R_(SNS).

The control circuit 110 provides control signals to control theoperations of the switch Q to transfer the electric energy to the load109. In an example, the control circuit 110 provides a pulse widthmodulation (PWM) signal with pulses having a relatively high frequency,such as in the order of 100 KHz, and the like, to control the switch Q.

According to an embodiment of the disclosure, the control circuit 110monitors the input voltage, such as the rectified voltage V_(RECT), anddetects a firing start of the TRIAC type dimmer 102 in the power supply.Then the control circuit 110 generates the PWM signal in response to thefiring start to control the switch Q, and shape the current pulled fromthe power supply to support the operation of the TRIAC type dimmer 102.

In an embodiment, the control circuit 110 is integrated on one or moreintegrated circuit (IC) chips. In the FIG. 1 example, the controlcircuit 110 includes a detector 140 and a controller 150. The detector140 includes any suitable detecting circuits to detect variousparameters in the electronic system 100, such as the voltage level ofthe rectified voltage V_(RECT), the current I_(Q) flowing through theswitch Q and the like.

The controller 150 then generates the PWM signal to control the switch Qbased on the detected parameters. The controller 150 can use anysuitable algorithm to generate the PWM signal. In an example, thecontroller 150 fixes the frequency of the PWM signal and adjusts a peakcurrent limit to shape the current pulled from the power supply. In theFIG. 1 example, the switch Q is implemented as an N-typemetal-oxide-semiconductor (MOS) transistor, and the PWM signal isprovided to the gate terminal of the N-type MOS transistor. The PWMsignal switches between a first voltage level (e.g., 12V) and a secondvoltage level (e.g., ground) at a high switching frequency, such as 200KHz in an example. In each switching cycle, in an example, thecontroller 150 first provides the first voltage level (e.g., 12V) to thegate terminal of the N-type MOS transistor to switch on the N-type MOStransistor. When the N-type MOS transistor is switched on, the currentI_(Q) gradually increases, and energy is accumulated in the inductor L.The detector 140 monitors the current I_(Q). When the current I_(Q)reaches the peak current limit, the controller 150 provides the secondvoltage level (e.g., ground) to the gate terminal of the N-type MOStransistor to switch off the N-type MOS transistor.

In an embodiment, in response to a detected firing start, the controller150 uses a relatively large peak current limit. Then, after a timeduration, the controller 150 reduces the peak current limit, andprovides the PWM signal according to the reduced peak current limit. Dueto the fixed frequency, the energy transfer module 120 pulls arelatively large current at the firing start, and a reduced currentafter the firing start. The frequency of the PWM signal, the relativelylarge peak current limit, and the reduced peak current limit aredetermined to satisfy the latch current requirement and the hold currentrequirement of the TRIAC type dimmer 102.

In another example, the controller 150 uses a constant peak currentlimit and adjusts the frequency of the PWM signal to shape the currentpulled from the power supply. In an embodiment, in response to adetected firing start, the controller 150 uses a relatively largefrequency to generate the PWM signal. Then, after a time duration, thecontroller 150 reduces the frequency. Due to the constant peak current,the energy transfer module 120 pulls a relatively large current at thefiring start, and a reduced current after the firing start. The constantpeak current limit, the relatively large frequency of the PWM signal,and the reduced frequency are determined to satisfy the latch currentrequirement and the hold current requirement of the TRIAC type dimmer102.

It is noted that, in another example, the controller 150 adjusts boththe peak current limit and the frequency of the PWM signal to shape thecurrent pulled from the power supply.

In an embodiment, one or more profiles for current to be pulled from thepower supply is stored. In an example, a profile includes a latchingportion and a holding portion. The profile includes a plurality ofparameters, such as a rising edge delay, a rising edge slope, a durationof latch current flat area, a falling edge slope from the latch currentto the hold current, and the like to define the preferred shape oflatching portion and the holding portion of the current. According tothe profile, the controller 150 determines the peak current and thefrequency of the PWM signal, and generates the PWM signal to control theswitch Q, thus the current pulled from the power supply can match theprofile. In an example, the controller 150 dynamically adjusts the peakcurrent and the frequency of the PWM signal based on detected voltage orcurrent parameters in the electronic system 100 to satisfy variousrequirements, such as the latch current requirement, the hold currentrequirement, and the like.

The controller 150 can be implemented using any suitable technology. Inan embodiment, the controller 150 is implemented as softwareinstructions executed by a processor. In another embodiment, thecontroller 150 is implemented using integrated circuits.

FIG. 2 shows a block diagram of another electronic system example 200using a fly-back topology according to an embodiment of the disclosure.The electronic system 200 operates similarly to the electronic system100 described above. The electronic system 200 also utilizes certaincomponents, such as the rectifier 203, the damping circuit 204, thecontrol circuit 210, and the load 209, that are identical or equivalentto those used in the electronic system 100; the description of thesecomponents has been provided above and will be omitted here for claritypurposes.

In the FIG. 2 example, the energy transfer module 220 includes atransformer T, a switch Q, a diode D, a capacitor C, and a sensingresistor R_(SNS) coupled together in a fly-back topology. Thetransformer T includes a primary winding (P) coupled with the switch Qto receive the rectified voltage V_(RECT) and includes a secondarywinding (S) coupled to the load 209 to drive the load 209.

In an embodiment, the control circuit 210 provides control signals tocontrol the operations of the switch Q to transfer the electric energyfrom the primary winding to the secondary winding. In an example, thecontrol circuit 210 provides a pulse width modulation (PWM) signal withpulses having a relatively high frequency, such as in the order of 100KHz, and the like, to control the switch Q.

Specifically, in an example, when the switch Q is switched on, a currentI_(Q) flows through the primary winding of the transformer T, and theswitch Q. The polarity of the transformer T and the direction of thediode D can be arranged such that there is no current in the secondarywinding of the transformer T when the switch Q is switched on. Thus, thereceived electric energy is stored in the transformer T.

When the switch Q is switched off, the current I_(Q) becomes zero. Thepolarity of the transformer T and the direction of the diode D canenable the secondary winding to deliver the stored electric energy tothe capacitor C and the load 209. The capacitor C can filter out thehigh frequency components and enable a relatively stable load current tobe driven to the load 209.

FIG. 3 shows a plot 300 of waveforms in an AC cycle according to anembodiment of the disclosure. The plot 300 includes a first waveform 310for the rectified voltage V_(RECT), a second waveform 320 for a firstprofile of the input current I_(IN), a third waveform 330 for a secondprofile of the input current I_(IN), a fourth waveform 340 for a thirdprofile of the input current I_(IN), a fifth waveform 350 for a fourthprofile of the input current I_(IN).

In the FIG. 3 example, the power supply includes a TRIAC type dimmer.During an AC cycle, when the AC voltage V_(AC) crosses zero, the TRIACis turned off, the rectified voltage V_(RECT) is about zero, as shown by311. When the TRIAC is turned on, the rectified voltage V_(RECT) isabout the same as the AC voltage V_(AC), as shown by 312.

According to the first profile, at the time of the TRIAC firing start,without rising edge delay, the input current I_(IN) rises to about thelatch current I_(LATCH) with a very large rising edge slope, as shown by322. The input current I_(IN) then stays about the latch currentI_(LATCH) level for a time duration, and then falls to the hold currentI_(HOLD) level with a falling edge slope, as shown by 323. Further, theinput current I_(IN) stays constantly at the hold current I_(HOLD) leveluntil the TRIAC is turned off, as shown by 324 and 325.

According to the second profile, at the time of the TRIAC firing start,with a short rising edge delay, the input current I_(IN) rises to aboutthe latch current I_(LATCH) level. For example, the input current I_(IN)first rises to about the hold current I_(HOLD) level, and then rises toabout the latch current I_(LATCH) with a large rising edge slope, asshown by 332 and 333. The input current I_(IN) then stays about thelatch current I_(LATCH) level for a time duration, and then falls to thehold current I_(HOLD) level with a falling edge slope, as shown by 334.Further, the input current I_(IN) stays constantly at the hold currentI_(HOLD) level until the TRIAC is turned off, as shown by 335 and 336.

According to the third profile, at the time of the TRIAC firing start,without rising edge delay, the input current I_(IN) rises to about thelatch current I_(LATCH) with a very large rising edge slope, as shown by342. The input current I_(IN) then stays about the latch currentI_(LATCH) level for a time duration, and then falls to the hold currentI_(HOLD) level with a falling edge slope, as shown by 343. Further, theinput current I_(IN) increases from the hold current I_(HOLD) level asthe rectified voltage V_(RECT) drops to keep the delivered power to berelatively constant until the TRIAC is turned off, as shown by 344 and345.

According to the fourth profile, at the time of the TRIAC firing start,with a short rising edge delay, the input current I_(IN) rises to aboutthe latch current I_(LATCH) level. For example, the input current I_(IN)first rises to about the hold current I_(HOLD) level, and then rises toabout the latch current I_(LATCH) with a large rising edge slope, asshown by 352 and 353. The input current I_(IN) then stays about thelatch current I_(LATCH) level for a time duration, and then falls to thehold current I_(HOLD) level with a falling edge slope, as shown by 354.Further, the input current I_(IN) increases from the hold currentI_(HOLD) level as the rectified voltage V_(RECT) drops to keep thedelivered power to be relatively constant until the TRIAC is turned off,as shown by 355 and 356.

In an example, one or more of the current profiles are stored in acontrol circuit, such as the control circuit 110, the control circuit210, and the like. Then the control circuit determines controlparameters for a PWM signal according to the profile. Further thecontrol circuit generates the PWM signal according to the determinedcontrol parameters, and the PWM signal is used to control a switch topull current from a power supply. The current pulled from the powersupply then matches the profile.

The FIG. 4 shows a flow chart outlining a process example 400 accordingto an embodiment of the disclosure. In an embodiment, the process isexecuted in a control circuit, such as the control circuit 110, thecontrol circuit 210, and the like to shape a current pulled from a powersupply to support the operation of the power supply, such as theoperation of a TRIAC dimmer in the power supply. The process starts atS401 and proceeds to S410.

At S410, a profile for current pulled from the power supply is stored.In an embodiment, a profile, such as any one of the profiles in FIG. 3,includes a latching portion to satisfy a latch current requirement of afiring start for the TRIAC dimmer, and a holding portion to satisfy ahold current requirement for the TRIAC dimmer to stay in turn-on statusafter the firing start.

At S420, a PWM signal is generated to shape the current according to thelatching portion in response to a firing start of the TRIAC dimmer. Inan example, a detector in the control circuit, such as the detector 140in the control circuit 110 and the like, detects a firing start of theTRIAC dimmer. Further, a controller in the control circuit, such as thecontroller 150 determines parameters, such as frequency, peak currentlimit, and the like, for the PWM signal according to the latchingportion of the profile, and generates the PWM signal according to thedetermined parameters. The PWM signal is provided to a switch, such asthe switch Q, to switch on/off the switch in order to pull current fromthe power supply to satisfy the latch current requirement.

At S430, the PWM signal is generated to shape the current according tothe holding portion after the firing start. In an example, after apredetermined time duration, the controller 150 adjusts the parametersof the PWM signal, such as the frequency of the PWM signal, the peakcurrent limit, and the like, according to the holding portion of theprofile, and generates the PWM signal according to the adjustedparameters. The PWM signal is used to switch on/off the switch Q inorder to pull current from the power supply to satisfy the hold currentrequirement.

At S440, the PWM signal generation is disabled when the TRIAC is turnedoff. And the process returns to S420 to wait for the TRIAC to fireagain.

While aspects of the present disclosure have been described inconjunction with the specific embodiments thereof that are proposed asexamples, alternatives, modifications, and variations to the examplesmay be made. Accordingly, embodiments as set forth herein are intendedto be illustrative and not limiting. There are changes that may be madewithout departing from the scope of the claims set forth below.

What is claimed is:
 1. A circuit, comprising: a detector configured todetect a start of turning on a triode for alternating current (TRIAC) ina power supply; and a controller configured to control a switch inconnection with a magnetic component in response to the start of turningon the TRIAC in the power supply to adjust a switching current flowingthrough the magnetic component to have at least a first peak current anda second peak current, the adjustment of the switching current flowingthrough the magnetic component causing a current pulled from the powersupply to satisfy a latch current requirement when the switching currentis adjusted to have the first peak current and to satisfy a hold currentrequirement of the TRIAC when the switching current is adjusted to havethe second peak current.
 2. The circuit of claim 1, wherein thecontroller is configured to adjust the switching current to cause thecurrent at a first level to enable enough latch current for the TRIAC atthe start of turning on the TRIAC in the power supply.
 3. The circuit ofclaim 1, wherein the detector is configured to detect the switchingcurrent passing through the switch, and the controller is configured tocontrol the switch according to the detected switching current to shapethe current pulled from the power supply.
 4. The circuit of claim 2,wherein the controller is configured to adjust the switching current tocause the current at a second level that is lower than the first levelto enable enough hold current for the TRIAC after the start of turningon the TRIAC in the power supply.
 5. The circuit of claim 3, wherein thecurrent pulled from the power supply includes the switching current, anda damping current by a damping circuit.
 6. The circuit of claim 3,wherein the controller is configured to control at least one of a risingedge delay for the current to rise to the first level, a rising edgeslope for the current to rise to the first level, a duration for thecurrent to above a threshold, and a falling edge slope for the currentto fall from the first level to the second level.
 7. The circuit ofclaim 5, wherein a capacitance of the damping circuit is smaller than aspecific value.
 8. An apparatus, comprising: a switch in connection witha magnetic component for transferring energy from an energy source to aload; and an integrated circuit (IC) chip comprising: a detectorconfigured to detect a start of turning on a triode for alternatingcurrent (TRIAC) in the energy source; and a controller configured tocontrol the switch in response to the start of turning on the TRIAC inthe energy source to adjust a switching current flowing through themagnetic component to have at least a first peak current and a secondpeak current, the adjustment of the switching current flowing throughthe magnetic component causing a current pulled from the energy sourceto satisfy a latch current requirement when the switching current isadjusted to have the first peak current and to satisfy a hold currentrequirement of the TRIAC when the switching current is adjusted to havethe second peak current.
 9. The apparatus of claim 8, wherein thecontroller is configured to adjust the switching current to cause thecurrent at a first level to enable enough latch current for the TRIAC atthe start of turning on the TRIAC in the energy source.
 10. Theapparatus of claim 8, wherein the detector is configured to detect theswitching current passing through the switch, and the controller isconfigured to control the switch according to the detected switchingcurrent to shape the current pulled from the power supply.
 11. Theapparatus of claim 8, further comprising: a damping circuit configuredto pull a damping current in response to the start of turning on theTRIAC in the energy source, and the current pulled from the energysource including the switching current, and the damping current.
 12. Theapparatus of claim 8, wherein the apparatus does not include a dampingcircuit, and the controller is configured to control the switch inresponse to the start of turning on the TRIAC in the energy source toshape the switching current to satisfy operation requirements of theTRIAC.
 13. The apparatus of claim 9, wherein the controller isconfigured to adjust the switching current to cause the current at asecond level that is lower than the first level to enable enough holdcurrent for the TRIAC after the start of turning on the TRIAC in theenergy source.
 14. The apparatus of claim 10, wherein the controller isconfigured to control at least one of a rising edge delay for thecurrent to rise to the first level, a rising edge slope for the currentto rise to the first level, a duration for the current to above athreshold, and a falling edge slope for the current to fall from thefirst level to the second level.
 15. A method, comprising: detecting astart of turning on a triode for alternating current (TRIAC) in a powersupply; and switching on/off a switch in connection with a magneticcomponent in response to the start of turning on the TRIAC in the powersupply to adjust a switching current flowing through the magneticcomponent to have at least a first peak current and a second peakcurrent, the adjustment of the switching current flowing through themagnetic component causing a current pulled from the power supply tosatisfy a latch current requirement when the switching current isadjusted to have the first peak current and to satisfy a hold currentrequirement of the TRIAC when the switching current is adjusted to havethe second peak current.
 16. The method of claim 15, wherein switchingon/off the switch in connection with the magnetic component in responseto the start of turning on the TRIAC in the power supply to adjust theswitching current flowing through the magnetic component furthercomprises: switching on/off the switch to pull the current at a firstlevel to enable enough latch current for the TRIAC at the start ofturning on the TRIAC in the power supply.
 17. The method of claim 15,wherein switching on/off the switch in connection with the magneticcomponent in response to the start of turning on the TRIAC in the powersupply to adjust the switching current flowing through the magneticcomponent further comprises: switching on/off the switch to pull thecurrent at a second level that is lower than the first level to enableenough hold current for the TRIAC after the start of turning on theTRIAC in the power supply.
 18. The method of claim 17, furthercomprising: switching on/off the switch to control at least one of arising edge delay for the current to rise to the first level, a risingedge slope for the current to rise to the first level, a duration forthe current to above a threshold, and a falling edge slope for thecurrent to fall from the first level to the second level.
 19. The methodof claim 15, further comprising: detecting the switching current passingthrough the switch; and switching on/off the switch according to thedetected switching current to shape the current pulled from the powersupply.
 20. The method of claim 15, further comprising: flowing adamping current by a damping circuit in response to the start of turningon the TRIAC in the power supply to satisfy a latch current requirementfor the TRIAC.